This invention relates to text processing, and in particular to the incorporation of variables into textual content, including translated textual content.
Processes for translating textual content into various languages are well known. For example, the sentence, “She commented on my video,” can be translated from English into various languages, such as Spanish or Finnish. This translation can be performed by a human translator or by an automated translator such as a computer program that uses a language dictionary and various translation algorithms. With either a human translator or an automated translator, the quality of the translation may vary. However, a competent human translator can often produce a higher quality translation of a text phrase and is less likely to change the meaning of the phrase or produce non-idiomatic translations.
Using a human translator to produce a translation generally requires effort and expense. As a result, it may be useful to have a human translator perform a single translation of a generic, or abstract, phrase with variables and have specific cases of the phrase be generated automatically. The variables are placeholders into which words or phrases can later be substituted.
Translating phrases with variables may be particularly useful in the context of a social networking website. A social networking website may have members who understand different languages and who desire to view phrases within the website in their particular language. The social networking website may also have members who are capable of translating phrases between languages and who are willing to perform these translations. Since many phrases appearing in a social networking website contain a particular person's name, it is useful to have members perform translations on phrases containing variables that can later be substituted with the particular name. The translation of text phrases containing variables, also referred to as tokens, is further described in U.S. application Ser. No. 12/329,288, filed on Dec. 5, 2008, entitled “Community Translation On A Social Network,” which is incorporated by reference in its entirety.
As an example, an English phrase with variables is “[var1] commented on [var2]'s video.” The variables [var1] and [var2] may represent names of people or other nouns, for example. The abstract phrase could cover “Juha commented on Nicolas's video,” or “Juha commented on Dave's video,” or “A user commented on Nicolas's video.” A human translator may translate this abstract English phrase to an abstract Finnish phrase of “[var1] kommentoi [var2]n videota.” When a specific case of the translated phrase needs to be produced (e.g., for display to a user), specific values can be substituted for the variables.
However, merely substituting values for variables in the translated phrase may produce an inaccurate or clunky translation of the original text. As a result, certain substituted values may not fit properly with the rest of the phrase, and the resulting translated phrase may have incorrect grammar or an incorrect meaning in the translated language.